<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>意见与建议</title>

    <meta name="keywords" content="">
    <meta name="description" content="">

    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->

    <link rel="shortcut icon" href="favicon.ico"> <link href="__STATIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__STATIC__/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/css/style.css?v=4.1.0" rel="stylesheet">
</head>
<style type="text/css">
    tr,td,th{
        text-align: center;
    }
</style>
<body>

<div class="ibox-content">
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>问题分类</th>
                <th>建议内容</th>
                <th>姓名</th>
                <th>性别</th>
                <th>联系方式</th>
                <th>号码</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {foreach $data as $d}
            <tr>
                <th>
                    {switch name="$d.problem"}
                        {case value="1"}<span style="color: blue">技术问题<span>{/case}
                        {case value="2"}<span style="color: yellow">内容问题<span>{/case}
                        {default /}未知
                    {/switch}
                </th>
                <th>{$d.comment}</th>
                <th>{$d.name}</th>
                <th>
                    {switch name="$d.sex"}
                        {case value="1"}男{/case}
                        {case value="2"}女{/case}
                        {default /}未知
                    {/switch}
                </th>
                <th>
                    {switch name="$d.fs"}
                        {case value="1"}微信{/case}
                        {case value="2"}手机{/case}
                        {default /}未知
                    {/switch}
                </th>
                <th>{$d.contact}</th>
                <th>
                    {switch name="$d.status"}
                        {case value="0"}<button onclick="getstatus('{$d.Id}')">未解决</button>{/case}
                        {case value="1"}<span style="color: green">已解决<span>{/case}
                        {default /}未知
                    {/switch}
                </th>
            </tr>
            {/foreach}
        </tbody>
    </table>

</div>


<!-- 全局js -->
<script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
<script src="__STATIC__/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__STATIC__/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="__STATIC__/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="__STATIC__/js/hAdmin.js?v=4.1.0"></script>
<script type="text/javascript" src="__STATIC__/js/index.js"></script>

<!-- 第三方插件 -->
<script src="__STATIC__/js/plugins/pace/pace.min.js"></script>
<script type="text/javascript">
    function getstatus(id){
        var url = '{:url("updatacomment")}';
        var data = {id:id};
        $.post(url,data,function(res){
            if(res==1){
                alert('问题已解决');
            }else{
                alert('问题未解决');
            }
        window.location.replace('{:url("comment")}')
        })
    }
</script>

</body>
</html>